package 数组;

import java.util.Scanner;

public class Zuoye03143 {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        String[] a=new String[15];
        int[] b=new int[15];
        for (int i=0;i<a.length;){
            System.out.println("请输入第"+(i+1)+"名同学的姓名和成绩：");
            a[i]=scan.next();
            b[i]=scan.nextInt();
            if (b[i]>=0&&b[i]<=100){
                i++;
                continue;
            }
            System.out.println("第"+(i+1)+"名同学的成绩输入错误，请重新输入");
        }
        for (int i=0;i<a.length;i++){
            System.out.println("第"+(i+1)+"名"+a[i]+"同学的成绩："+b[i]);
        }
    }
}
